﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Admin_Admin_CapNhatDoiTac : System.Web.UI.Page
{
    
    protected void Page_Load(object sender, EventArgs e)
    {
        DataDSTableAdapters.DOITACTableAdapter dtadapter = new DataDSTableAdapters.DOITACTableAdapter();
        DataDS.DOITACDataTable dttable = dtadapter.DOITAC_LayTatCa();
      //  Response.Write(dttable.Rows.Count);
        grvDoiTac.DataSource = null;
        grvDoiTac.DataSource = dttable;
        grvDoiTac.DataBind();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (txtTenDoiTac.Text != "")
        {
            DataDSTableAdapters.DOITACTableAdapter dtadapter = new DataDSTableAdapters.DOITACTableAdapter();
            DataDS.DOITACDataTable dttable = dtadapter.DOITAC_TimTheoTenDoiTac(txtTenDoiTac.Text);
            grvDoiTac.DataSource = null;
            grvDoiTac.DataSource = dttable;
            grvDoiTac.DataBind();
        }
        else
        {
            DataDSTableAdapters.DOITACTableAdapter dtadapter = new DataDSTableAdapters.DOITACTableAdapter();
            DataDS.DOITACDataTable dttable = dtadapter.DOITAC_LayTatCa();
          //  Response.Write(sptable.Rows.Count);
            grvDoiTac.DataSource = null;
            grvDoiTac.DataSource = dttable;
            grvDoiTac.DataBind();
        }
    }
}
